﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/include/context.jsp" %>
<form id="form1" action="${ctx}/user/usermanager/${empty user || empty user.id ?'save':'update' }" method="post"  style="margin: 0px;" onSubmit="return Validator.Validate(this,3) ">
		
		<input type="hidden" name="user.id" value="${user.id}"> 
		<c:if test="${!empty user && null != user.id}">
			<input type="hidden" name="user.password" value="${user.password }"/>
		</c:if>
	<table cellspacing="0" cellpadding="0" class="form-grid">
		<tbody>
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;" >用户名：</td>
				<td colspan="3"><input id="user.name" type="text" name="user.name" value="${user.name}" size="15"  ${empty user && user == null ? ' dataType="Require" msg=""' : 'readonly="readonly"'}/></td>
			</tr>
			<c:if test="${empty user || empty user.id}">
				<tr>
					<td style="text-align: right; padding-right: 3px; width: 30%;">用户密码：</td>
					<td>
						<input type="password" name="user.password" value="${user.password}" size="15"  dataType="Require" msg=""/>
					</td>
					<td style="text-align: right; padding-right: 3px; width: 30%;">密码确认：</td>
					<td><input type="password" name="user.repassword" value="${user.repassword}" size="15"  dataType="Repeat" to="user.password" msg="" /></td>
				</tr>
			</c:if>
			
			
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">email：</td>
				<td><input type="text" name="user.email" value="${user.email}" size="15" dataType="Email" msg=""/></td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">联系电话：</td>
				<td><input type="text" name="user.telephone" value="${user.telephone}" size="15"/></td>
			</tr>
			
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户职位：</td>
				<td><input type="text" name="user.position" value="${user.position}" size="15"/></td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户状态：</td>
				<td>
					<select name="user.disabled">
						<option value="false">启用</option>
						<option value="true">禁用</option>
					</select>
				</td>
				
			</tr>
			
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户描述：</td>
				<td colspan="3"><input type="text" name="user.description" value="${user.description}" size="50"/></td>
			</tr>
		</tbody>
	</table>
			
	<div class="window_footer"><input type="button" value="确定"  onclick="duplicate($('form1'),3,'select count(1) from user where name =:name ','name','user.name','用户名重复，请重新输入' );"></div>
</form>



	
